<include file="public:top" />
<!--网站设置-->
<body class="body">
<style type="text/css">
    .red {color: #FF5722!important;}
    .green {color: #5FB878!important;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
     <div class="my-btn-box">
     <span class="fr">
       <a class="layui-btn layui-btn-normal" id="btn-add">添加导航</a>
     </span>
    </div> 
 
<form class="layui-form layui-form-pane" action="">
    <table class="layui-table">
        <colgroup>
          <col width="60">
            <col width="150">
            <col width="150">
            <col width="">
            <col width="120">
            <col width="120">
            
            <col width="120">
            <col width="120">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>{:L('nav_name')}</th>
            <th>{:L('alias')}</th>
            <th>{:L('nav_link')}</th>
            <th>导航位置</th>
            <th>{:L('sort_order')}</th>
             
            <th>{:L('enabled')}</th>
            <th>{:L('operations_manage')}</th>
        </tr>
        </thead>
         <tbody id="userList">
            <volist name="list" id="val" >
              <tr>
                      <td><span>{$val.id}</span></td>
                      <td><span>{$val.name}</span></td>
                      <td><span>{$val.alias}</span></td>
                      <td><span>{$val.link}</span></td>
                      <td><span><if condition="$val.type eq 'main'">主导航<else/>底部导航</if></span></td>
                      <td><span>{$val.ordid}</span></td>
                       
                      <td>
                        <input type="checkbox" name="status" value="{$val.status}" data-uri="{:U('nav/ajax_edit',array('id'=>$val['id'],'field'=>'status'))}" lay-skin="switch" lay-filter="status" lay-text="启用|禁止" <if condition="$val.status eq 1">checked </if>>
                      </td>
                      <td><a href="javascript:;" id="edit" data-uri="{:U('nav/edit', array('id'=>$val['id']))}" data-title="{:L('edit')} - {$val.name}"  data-id="edit" data-id="{$val.id}">{:L('edit')}</a> | <a href="javascript:;"  id="delete" data-uri="{:U('nav/delete', array('id'=>$val['id']))}" data-id="{$val.id}">{:L('delete')}</a></td>
                  </tr>
            </volist>
        </tbody>

    </table>
</form>
<div id="test-laypage-demo0">
  <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-29">
  {$page}
  </div>
</div>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
layui.use(['layer','jquery','form','element','table'], function () {
    //参数：layui、名称、模块名、主键（删除用）
    //新增弹窗
    Oper.config.add.width = '600px';
    Oper.config.add.height = '510px';

    //编辑弹窗
    Oper.config.edit.width = '600px';
    Oper.config.edit.height = '510px';
    Oper.initList(layui, '导航', 'nav', 'id');
});
</script>
</body>
</html>